#ifndef SOLOADER_PATCH_FONT_H
#define SOLOADER_PATCH_FONT_H

#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>

#include "font_cache.h"

#define SDL_DONTFREE2 0x00000020

typedef struct
{
    char *path;
    int ptsize;
    TTF_Font *font;
    int font_size;
    TextSurfaceList surf_list;
} mFont;

SDL_Surface *TTF_RenderUTF8_Blended_soloader(mFont *font, const char *text, SDL_Color fg);
SDL_Surface *TTF_RenderUTF8_Shaded_soloader(mFont *font, const char *text, SDL_Color fg, SDL_Color bg);
SDL_Surface *TTF_RenderUTF8_Solid_soloader(mFont *font, const char *text, SDL_Color fg);

TTF_Font *TTF_OpenFontRW_soloader(SDL_RWops *src, int freesrc, int ptsize);
void TTF_CloseFont_soloader(TTF_Font *font);

int initPatchFont();
void deinitPatchFont();

extern char *(*GetStringDB)(int id);

extern char *stringDB_1624;

#endif